package com.ruoyi.bizsys.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 催收减免订单对象 collection_reduce_order
 *
 * @author african-loan
 * @date 2022-08-15
 */

@Data
public class CollectionReduceOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    // 状态:0失败未通过，1通过，2已经使用，3过期失效，9等待审核
    /**失败未通过**/
    public static final int ORDER_STATUS_FAILED = 0;
    /**1通过审核未消费**/
    public static final int ORDER_STATUS_SUCCED = 1;
    /**2已经使用**/
    public static final int ORDER_STATUS_HASUSED = 2;
    /**3过期失效**/
    public static final int ORDER_STATUS_EXPED = 3;
    /**9等待审核**/
    public static final int ORDER_STATUS_WAITING_PASS = 9;

    /**订单来源催收**/
    public static final String ACTION_TYPE_COLLECTION = "collection";


    @TableField(exist = false)
    private String loanSerialNos;

    @TableField(exist = false)
    private String expTimeStr;

    /**
     * 主键id
     */
    @Excel(name = "${comment}", readConverterExp = "主键id")
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 订单id
     */

    @Excel(name = "订单id")
    private Long collectionReduceOrderId;

    /**
     * 客户号
     */
    @Excel(name = "客户号")
    private String custNo;
    /**
     * 贷款流水号
     */

    @Excel(name = "贷款流水号")
    private String loanSerialNo;
    /**
     * 减免金额
     */
    @Excel(name = "减免金额")
    private BigDecimal reduceAmt;
    /**
     * 减免动作：催收减免，等
     */

    @Excel(name = "减免动作：催收减免，等")

    private String actionType;


    /**
     * 失效时间
     */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "失效时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")

    private Date expTimeAt;


    /**
     * 减免流水号
     */

    @Excel(name = "减免流水号")

    private String remissionNo;


    /**
     * 逾期天数开始
     */

    @Excel(name = "逾期天数开始")

    private Long overdueDaysBegin;


    /**
     * 逾期天数结束
     */

    @Excel(name = "逾期天数结束")

    private Long overdueDaysEnd;


    /**
     * 罚息减免比例
     */

    @Excel(name = "罚息减免比例")

    private BigDecimal lateFeeReduceRate;


    /**
     * 剩余还款金额比例
     */

    @Excel(name = "剩余还款金额比例")

    private BigDecimal remainingRepayAmtRate;


    /**
     * 减免有效天数
     */

    @Excel(name = "减免有效天数")

    private Integer reduceValidDays;


    /**
     * 状态:0失败未通过，1通过，2已经使用，3过期失效，9等待审核
     */

    @Excel(name = "状态:0失败未通过，1通过，2已经使用，3过期失效，9等待审核")

    private Integer status;

    private String  remark;

    /**
     * 状态（0：未启用；1：启用）
     */

    @Excel(name = "状态", readConverterExp = "0=：未启用；1：启用")

    private String state;


    /**
     * 创建者
     */

    @Excel(name = "状态", readConverterExp = "创建者")

    private String createBy;


    /**
     * 创建时间
     */

    @Excel(name = "状态", readConverterExp = "创建时间")

    private Date createTime;


    /**
     * 更新人
     */

    @Excel(name = "状态", readConverterExp = "更新人")

    private String updateBy;


    /**
     * 更新时间
     */

    @Excel(name = "状态", readConverterExp = "更新时间")

    private Date updateTime;

}